#pragma once
#include "Effect.h"
#include "LightActor.h"

namespace mini
{
#define NUM_LIGHTS 4
	class CLightEffect : public CEffect
	{
	public:
		CLightEffect();
		virtual ~CLightEffect();
		virtual bool init(CDevice* pDevice) override;
		virtual void commitToGpu(DeviceContext* pDeviceContext) override;
		virtual void addActor(CActor* pActor) override;
				
	private:
		struct PointLightInfo
		{
			CPoint4F lightPosition;
			CPoint4F ambientColor;
			CPoint4F diffuseColor;
			CPoint4F specularColor;
		};

		struct DirectionLightInfo 
		{
			CPoint4F ambientColor;
			CPoint4F diffuseColor;
			CPoint4F specularColor;
			CPoint4F LightDirection;
		};

		CLightActor* mpDirectionLight = nullptr;
		std::list<CLightActor*>	mPointLights;
		std::vector<PointLightInfo>	mPointLightInfo;
		DirectionLightInfo			mDirectionLightInfo;

	};
}